/*
 **	Bone.cpp

 Program:   
 Module:    
 Language:  C++
 Date:      
 Version:   

 **      Created: Nov 23 2007.
 **	
 **	purpose:   
 */

#ifndef __BONE_CPP__
#define __BONE_CPP__

#include "Bone.h"

using namespace std;

// Constructor passing initial values.
// @param _id given bone id (unique)
// @param _name given bone name (unique)
// @param _direction given bone direction
// @param _length given bone length
// @param _axis given bone rotation axis
// @param _axis_order given bone axis order for rotations
// @param _bodymass given bone bodymass
// @param _cofmass given bone cofmass
// @param _dof given bone degrees of freedom
// @param _limits given bone limits of each degree of freedom
// @param _axis_x given bone axis X rotated 
// @param _axis_y given bone axis Y rotated
// @param _axis_z given bone axis Z rotated
Bone::Bone(int _id, string _name, Vector3d _direction, double _length, Vector3d _axis, string _axis_order,
		double _bodymass, double _cofmass, string _dof, vector<Vector2d> _limits, Vector3d _axis_x, Vector3d _axis_y,
		Vector3d _axis_z) {
    id = _id;
    name = _name;
    direction = _direction;
    or_direction = _direction;
    length = _length;
//    axis = _axis;
    axis_order = _axis_order;
    bodymass = _bodymass;
    cofmass = _cofmass;
    dof = _dof;
    limits = _limits;
    color.x = rand() / double(RAND_MAX);
    color.y = rand() / double(RAND_MAX);
    color.z = rand() / double(RAND_MAX);
    axis_x = _axis_x;
    axis_y = _axis_y;
    axis_z = _axis_z;
    alfa = beta = gama = 0.0;
}

#endif
